package game.Config;

import org.newdawn.slick.geom.Vector2f;

import game.Actors.Player;
import game.Actors.Tower;

/**
 * This class is used for storing variabels between different
 *  screens.
 * @author Sebastian Isheden and Victor Beer
 *
 */
public class Storage {
	private static Player tempPlayer;
	private static Tower tempTower;
	private static Vector2f selectedPosition;
	
	public static Vector2f getPosition(){
		return selectedPosition.copy();
	}
	/**
	 * Stores the given position, given in pixels.
	 * @param position	The position to be stored.
	 */
	public static void storePosition(Vector2f position){
		selectedPosition = position.copy();
	}
	
	/**
	 * Returns the stored tower
	 * @return The stored tower.
	 */
	public static Tower getTower(){
		return tempTower;
	}
	
	/**
	 * Stores a tower.
	 * @param tower The tower to be stored
	 */
	public static void storeTower(Tower tower){
		tempTower = tower;
	}
	
	/**
	 * Returns the stored player-
	 * @return The stored player.
	 */
	public static Player getPlayer(){
		return tempPlayer;
	}
	
	/**
	 * Stores a player.
	 * @param player The player to be stored.
	 */
	public static void storePlayer(Player player){
		tempPlayer = player;
	}
}
